package org.shiwen.week9.thurday.q4;

public class Car extends Vehicle implements IPower {
    private String carNumber;

    public Car(String brand, String color, String carNumber) {
        super(brand, color);
        this.carNumber = carNumber;
    }

    public String getCarNumber() {
        return carNumber;
    }

    public void setCarNumber(String carNumber) {
        this.carNumber = carNumber;
    }

    @Override
    public void power() {
        System.out.println("加油");
    }

    @Override
    public void run() {
        System.out.println("使用"+getBrand()+"的"+getColor()+"汽车，车牌号为"+getCarNumber());
    }
}
